controlWindowInsetsAnimation
Lets the application control window inset animations in a frame-by-frame manner by modifying the position of the windows in the system causing insets directly using setInsetsAndAlpha in the controller provided by the given listener.
This method only works on API >= 30 since there is no way to control the window in the system on prior APIs.
Parameters
The WindowInsetsCompat.Types the application has requested to control.
Duration of animation in MILLISECONDS, or -1 if the animation doesn't have a predetermined duration. This value will be passed to getDurationMillis
The interpolator used for this animation, or null
if this animation doesn't follow an interpolation curve. This value will be passed to getInterpolator and used to calculate getInterpolatedFraction.
A cancellation signal that the caller can use to cancel the request to obtain control, or once they have control, to cancel the control.
The WindowInsetsAnimationControlListener that gets called when the windows are ready to be controlled, among other callbacks.